hiroyuking
@hiroyuking has joined the channel
Warning: Pattern match(es) are non-exhaustive
Left :: a %1 -> Either a b
stack build --docker
するError: While constructing the build plan, the following exceptions were encountered: In the dependencies for hashable-1.3.0.0: integer-gmp must match >=0.4 && <1.1, but the stack configuration has no specified version (latest matching version is 1.0.3.0) needed due to test-0.1.0.0 -> hashable-1.3.0.0 In the dependencies for integer-logarithms-1.0.3.1: integer-gmp must match <1.1, but the stack configuration has no specified version (latest matching version is 1.0.3.0) needed due to test-0.1.0.0 -> integer-logarithms-1.0.3.1 In the dependencies for scientific-0.3.7.0: integer-gmp needed, but the stack configuration has no specified version (latest matching version is 1.0.3.0) needed due to test-0.1.0.0 -> scientific-0.3.7.0 Some different approaches to resolving this: * Recommended action: try adding the following to your extra-deps in (略)/stack.yaml: - integer-gmp-1.0.3.0@sha256:514e81647473ce380cf1814821664c0dcedc2801ad8dbf41b19a10f916e1cc75,2138 Plan construction failed.
newtype Error = Error Int pattern InternalError = Error 1 instance Show Error where show (Error 1) = "InternalError"
deriveFieldsForSumType ''HasBase ''ToyExpr
instance HasBase ToyExpr Text where base = lens getter setter where getter (ToyExprToyInt x) = view base x getter (ToyExprToyStr x) = view base x setter (ToyExprToyInt x) y = toToyExpr $ set base y x setter (ToyExprToyStr x) y = toToyExpr $ set base y x
cos (pi/2)
shouldBe` 0` は成功してほしいのですが失敗するなどします。almostEqual :: Float -> Float -> Bool almostEqual a b = a+diff >= b && b <= a+diff where diff = 0.1 -- 無視してよい誤差の範囲を決めるよしなな数字、今は適当
liftToReader :: forall env m a. (MonadReader env m, MonadIO m) => (env -> IO a) -> m a liftToReader f = reader $ \env -> (liftIO :: IO a -> m a) $ f env
C:\sr\ghc-8.2.2\text-2.0-5e3f12ca9a37edf5a48459f7f3969564285f2adb\lib/libHStext-2.0-5e3f12ca9a37edf5a48459f7f3969564285f2adb.a(measure_off.o):measure_off.c:(.text+0x2da): undefined reference to `__get_cpuid_count'