Send Beginners mailing list submissions to beginners@haskell.org To subscribe or unsubscribe via the World Wide Web, visit http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners or, via email, send a message with subject or body 'help' to beginners-requ...@haskell.org
You can reach the person managing the list at beginners-ow...@haskell.org When replying, please edit your Subject line so it is more specific than "Re: Contents of Beginners digest..." Today's Topics: 1. Stack could not find libHStransformers (Quentin Liu) 2. Re: Stack could not find libHStransformers (Michael Snoyman) 3. Little question about "forall" (Baa) ---------------------------------------------------------------------- Message: 1 Date: Thu, 7 Dec 2017 01:43:22 -0500 From: Quentin Liu <quentin.liu.0...@gmail.com> To: The Haskell-Beginners Mailing List - Discussion of primarily beginner-level topics related to Haskell <beginners@haskell.org> Subject: [Haskell-beginners] Stack could not find libHStransformers Message-ID: <d377cf51-f745-441e-a6e8-8493e47ab013@Spark> Content-Type: text/plain; charset="utf-8" Hi, I was trying to use Parsec and imported Text.ParserCombinators.Parsec. I could call “stack ghc” to compile the file, but when I loaded the file into ghci and called any function, ghci would report errors > can't load .so/.DLL for: > /Users/HereWegoR/.stack/snapshots/x86_64-osx/lts-8.8/8.0.2/lib/x86_64-osx-ghc-8.0.2/libHSmtl-2.2.1-BLKBelFsPB3BoFeSWSOYj6-ghc8.0.2.dylib > > (dlopen(/Users/HereWegoR/.stack/snapshots/x86_64-osx/lts-8.8/8.0.2/lib/x86_64-osx-ghc-8.0.2/libHSmtl-2.2.1-BLKBelFsPB3BoFeSWSOYj6-ghc8.0.2.dylib, > 5): Library not loaded: > /usr/local/opt/ghc/lib/ghc-8.0.2/transformers-0.5.2.0/libHStransformers-0.5.2.0-ghc8.0.2.dylib > Referenced from: > /Users/HereWegoR/.stack/snapshots/x86_64-osx/lts-8.8/8.0.2/lib/x86_64-osx-ghc-8.0.2/libHSmtl-2.2.1-BLKBelFsPB3BoFeSWSOYj6-ghc8.0.2.dylib > Reason: image not found) > I tried to install transformers by calling `stack install transformers` but the problem still persisted. Is it because the version of transformers in my repo is different from the one referenced by `mtl` package? How should I fix it? Regards, Qingbo Liu -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.haskell.org/pipermail/beginners/attachments/20171207/293a9bf7/attachment-0001.html> ------------------------------ Message: 2 Date: Thu, 7 Dec 2017 08:54:45 +0200 From: Michael Snoyman <mich...@snoyman.com> To: The Haskell-Beginners Mailing List - Discussion of primarily beginner-level topics related to Haskell <beginners@haskell.org> Subject: Re: [Haskell-beginners] Stack could not find libHStransformers Message-ID: <CAKT9ecPjwAJjEZEE3ZWvQ4TBoVrN6PeXW5LbHHbuLEnX8=k...@mail.gmail.com> Content-Type: text/plain; charset="utf-8" What version of Stack are you using (stack --version), and how did you install Stack and GHC? It looks like you're using a system-wide GHC installation, which (for reasons like this) we by default no longer use by default in recent Stack releases. Upgrading to the latest Stack (via `stack upgrade` or following the instructions at [1]) will probably solve the problem. [1] https://haskell-lang.org/get-started/osx On Thu, Dec 7, 2017 at 8:43 AM, Quentin Liu <quentin.liu.0...@gmail.com> wrote: > Hi, > > I was trying to use Parsec and imported Text.ParserCombinators.Parsec. I > could call “stack ghc” to compile the file, but when I loaded the file into > ghci and called any function, ghci would report errors > > can't load .so/.DLL for: /Users/HereWegoR/.stack/ > snapshots/x86_64-osx/lts-8.8/8.0.2/lib/x86_64-osx-ghc-8.0. > 2/libHSmtl-2.2.1-BLKBelFsPB3BoFeSWSOYj6-ghc8.0.2.dylib > (dlopen(/Users/HereWegoR/.stack/snapshots/x86_64-osx/ > lts-8.8/8.0.2/lib/x86_64-osx-ghc-8.0.2/libHSmtl-2.2.1- > BLKBelFsPB3BoFeSWSOYj6-ghc8.0.2.dylib, 5): Library not loaded: > /usr/local/opt/ghc/lib/ghc-8.0.2/transformers-0.5.2.0/ > libHStransformers-0.5.2.0-ghc8.0.2.dylib > Referenced from: /Users/HereWegoR/.stack/snapshots/x86_64-osx/lts-8.8/ > 8.0.2/lib/x86_64-osx-ghc-8.0.2/libHSmtl-2.2.1- > BLKBelFsPB3BoFeSWSOYj6-ghc8.0.2.dylib > Reason: image not found) > > > I tried to install transformers by calling `stack install transformers` > but the problem still persisted. Is it because the version of transformers > in my repo is different from the one referenced by `mtl` package? How > should I fix it? > > Regards, > Qingbo Liu > > _______________________________________________ > Beginners mailing list > Beginners@haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners > > -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.haskell.org/pipermail/beginners/attachments/20171207/84a0a920/attachment-0001.html> ------------------------------ Message: 3 Date: Thu, 7 Dec 2017 13:41:08 +0200 From: Baa <aqua...@gmail.com> To: The Haskell-Beginners Mailing List - Discussion of primarily beginner-level topics related to Haskell <beginners@haskell.org> Subject: [Haskell-beginners] Little question about "forall" Message-ID: <20171207134108.1ae548b8@Pavel> Content-Type: text/plain; charset=US-ASCII Hello everyone! Suppose I have: class C a where someA :: a f :: C a => a -> Int f a = let x = someA :: a in -- BUG!! 0 BUG as I understand I due to `:: a` - this is another `a`, not the same as in `f` singature. But seems that it's the same `a` if `f` is the "method" of some instance. And such bug does not happen if I return it, so my question is how to create such `x` of type `a` in the body of the `f`? How to use `a` anywhere in the body of `f`? Is it possible? I found a way if I change signature to `forall a. C a => a -> Int`. But there are another questions in the case: - as I know all such params are under "forall" in Haskell by-default. Seems it's not true? - in method body seems they are under "forall" but in simple functions - not? - i'm not sure what exactly does this "forall", IMHO it unbounds early bound type's variables (parameters) by typechecker, but how `a` can be bound in the just begining of signature (where it occurs first time) ?! As for me, looks that w/o "forall" all `a`, `b`, `c`, etc in the body of simple functions always are different types. But w/ "forall" Haskell typechecker makes something like (on type-level): let a = ANY-TYPE in ... here `a` can occur and will be bound to ANY-TYPE Where am I right and where am I wrong? :) === Best regards, Paul ------------------------------ Subject: Digest Footer _______________________________________________ Beginners mailing list Beginners@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners ------------------------------ End of Beginners Digest, Vol 114, Issue 5 *****************************************