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. Re:  Libraries for Playing Audio (Atrudyjane)
   2.  How to "cast" FromJSON instance value (Baa)
   3. Re:  Libraries for Playing Audio (Oliver Charles)
   4. Re:  How to "cast" FromJSON instance value (Jan von Löwenstein)
   5. Re:  How to "cast" FromJSON instance value (Baa)


----------------------------------------------------------------------

Message: 1
Date: Mon, 31 Jul 2017 22:42:17 -0400
From: Atrudyjane <atrudyj...@protonmail.com>
To: "i...@maximka.de" <i...@maximka.de>
Cc: The Haskell-Beginners Mailing List - Discussion of primarily
        beginner-level topics related to Haskell <beginners@haskell.org>
Subject: Re: [Haskell-beginners] Libraries for Playing Audio
Message-ID:
        
<9-OGhbO026pu9EbidNe8YkghqLbGz8CgLpKBj4PhoQS-MmwbETPtK1xtCBwjNsvD7tpFWIVTgMBQfyEjd2M8NcHHoIhVFwx8QcTgfx_reTo=@protonmail.com>
        
Content-Type: text/plain; charset="utf-8"

Thanks Alexei,
Think I've narrowed it down to either sox or conduit-audio. Looks like 
SDL-mixer hasn't been updated in a while and it has an 'All reported builds 
failed' status as of 2015.
Regards,
Andrea

Sent with [ProtonMail](https://protonmail.com) Secure Email.

> -------- Original Message --------
> Subject: Re: [Haskell-beginners] Libraries for Playing Audio
> Local Time: July 31, 2017 12:50 AM
> UTC Time: July 31, 2017 5:50 AM
> From: i...@maximka.de
> To: Atrudyjane <atrudyj...@protonmail.com>, The Haskell-Beginners Mailing 
> List - Discussion of primarily beginner-level topics related to Haskell 
> <beginners@haskell.org>
> There is haskell wrapper for powerful sox availiable also.
> http://hackage.haskell.org/package/sox
> Alexei
>> On 31 July 2017 at 07:09 Atrudyjane <atrudyj...@protonmail.com> wrote:
>>
>>
>> Hello Cafe,
>> Is there a recommended Haskell library for playing/manipulating audio files? 
>> There"s a long list of sound libraries on Hackage, and was thinking looking 
>> into either conduit-audio or SDL-mixer.
>> Thank You,
>> Andrea
>>
>> Sent with [ProtonMail](https://protonmail.com) Secure 
>> Email._______________________________________________
>> 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/20170731/aa973163/attachment-0001.html>

------------------------------

Message: 2
Date: Tue, 1 Aug 2017 11:31:40 +0300
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] How to "cast" FromJSON instance value
Message-ID: <20170801113140.250323e5@Pavel>
Content-Type: text/plain; charset=US-ASCII

Hello, List!

I have, for example, function with signature like

  fn :: FromJSON a => Map Text a -> BlahBlah

and I want to treat this `a` as String (or `Text`), to read it with
`readMaybe`. Am I right that it's impossible? I get error about "...a
is rigid type and could not be matched with Text...". But `Text` is
`FromJSON` instance. Is it possible to do it (cast, convert, unwrap, etc)?

The problem's source is that early I worked with `Text` values only
(getting from HTML form) but now they become any type: int's, bool's,
etc).

===
Best regards,
  Paul


------------------------------

Message: 3
Date: Tue, 01 Aug 2017 09:01:22 +0000
From: Oliver Charles <ol...@ocharles.org.uk>
To: Atrudyjane <atrudyj...@protonmail.com>,  The Haskell-Beginners
        Mailing List - Discussion of primarily beginner-level topics related
        to Haskell <beginners@haskell.org>, "i...@maximka.de"
        <i...@maximka.de>
Subject: Re: [Haskell-beginners] Libraries for Playing Audio
Message-ID:
        <CAGRp5R=swlr-th+8mvk8kpmcuyhdqvqfhm6ysrvjgafvtdh...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

What are your requirements? SDL2's audio module is functional, but I don't
know if it's sufficient for what you're looking for.

On Tue, Aug 1, 2017 at 3:44 AM Atrudyjane <atrudyj...@protonmail.com> wrote:

> Thanks Alexei,
>
> Think I've narrowed it down to either sox or conduit-audio. Looks like
> SDL-mixer hasn't been updated in a while and it has an 'All reported builds
> failed' status as of 2015.
>
> Regards,
> Andrea
>
>
> Sent with ProtonMail <https://protonmail.com> Secure Email.
>
> -------- Original Message --------
> Subject: Re: [Haskell-beginners] Libraries for Playing Audio
> Local Time: July 31, 2017 12:50 AM
> UTC Time: July 31, 2017 5:50 AM
> From: i...@maximka.de
> To: Atrudyjane <atrudyj...@protonmail.com>, The Haskell-Beginners Mailing
> List - Discussion of primarily beginner-level topics related to Haskell <
> beginners@haskell.org>
>
> There is haskell wrapper for powerful sox availiable also.
> http://hackage.haskell.org/package/sox
>
> Alexei
>
> > On 31 July 2017 at 07:09 Atrudyjane <atrudyj...@protonmail.com> wrote:
> >
> >
> > Hello Cafe,
> > Is there a recommended Haskell library for playing/manipulating audio
> files? There"s a long list of sound libraries on Hackage, and was thinking
> looking into either conduit-audio or SDL-mixer.
> > Thank You,
> > Andrea
> >
> > Sent with [ProtonMail](https://protonmail.com) Secure
> Email._______________________________________________
> > Beginners mailing list
> > Beginners@haskell.org
> > http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
>
>
> _______________________________________________
> 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/20170801/38433f85/attachment-0001.html>

------------------------------

Message: 4
Date: Tue, 01 Aug 2017 10:45:19 +0000
From: Jan von Löwenstein <jan.loewenst...@gmail.com>
To: The Haskell-Beginners Mailing List - Discussion of primarily
        beginner-level topics related to Haskell <beginners@haskell.org>
Subject: Re: [Haskell-beginners] How to "cast" FromJSON instance value
Message-ID:
        <CAJtP4w5qsgydxAhB4K6RQX65+kmJAOyg_V+E=GNii=esfoe...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

Hi,

You don't know anything about your a's but that they have FromJSON
instances. That in turn means you can get values from aeson parsing
functions. Think parseJSON :: Value -> Parser a
Could you be more specific about the problem you try to solve?

Best
Jan

Baa <aqua...@gmail.com> schrieb am Di., 1. Aug. 2017, 10:32:

> Hello, List!
>
> I have, for example, function with signature like
>
>   fn :: FromJSON a => Map Text a -> BlahBlah
>
> and I want to treat this `a` as String (or `Text`), to read it with
> `readMaybe`. Am I right that it's impossible? I get error about "...a
> is rigid type and could not be matched with Text...". But `Text` is
> `FromJSON` instance. Is it possible to do it (cast, convert, unwrap, etc)?
>
> The problem's source is that early I worked with `Text` values only
> (getting from HTML form) but now they become any type: int's, bool's,
> etc).
>
> ===
> Best regards,
>   Paul
> _______________________________________________
> 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/20170801/71edafd8/attachment-0001.html>

------------------------------

Message: 5
Date: Tue, 1 Aug 2017 14:01:17 +0300
From: Baa <aqua...@gmail.com>
To: beginners@haskell.org
Subject: Re: [Haskell-beginners] How to "cast" FromJSON instance value
Message-ID: <20170801140117.33db8801@Pavel>
Content-Type: text/plain; charset=US-ASCII

Hello, Jan! I "remove" the question :)
Problem was: reading of HTML form values, which can be any type and
saving them in a map. I done it w/ `Map Text Value` (instead of previous
`Map Text Text`). To get values from the map, I implemented class and
several instances which returns values of different types, something
like:

  class GetValue a where
    getValue :: Text -> Map Text Value -> a

(promoting of `a` anywhere in the existing code needs big refactoring,
so map's value is `::Value` but not `::a`). Cons is a need to implement
N instances of `GetValue`: one per getting type.

Anywhere, Jan, thanks for quick answer, I'm sorry for this stupid
question.


> Hi,
> 
> You don't know anything about your a's but that they have FromJSON
> instances. That in turn means you can get values from aeson parsing
> functions. Think parseJSON :: Value -> Parser a
> Could you be more specific about the problem you try to solve?
> 
> Best
> Jan
> 
> Baa <aqua...@gmail.com> schrieb am Di., 1. Aug. 2017, 10:32:
> 
> > Hello, List!
> >
> > I have, for example, function with signature like
> >
> >   fn :: FromJSON a => Map Text a -> BlahBlah
> >
> > and I want to treat this `a` as String (or `Text`), to read it with
> > `readMaybe`. Am I right that it's impossible? I get error about
> > "...a is rigid type and could not be matched with Text...". But
> > `Text` is `FromJSON` instance. Is it possible to do it (cast,
> > convert, unwrap, etc)?
> >
> > The problem's source is that early I worked with `Text` values only
> > (getting from HTML form) but now they become any type: int's,
> > bool's, etc).
> >
> > ===
> > Best regards,
> >   Paul
> > _______________________________________________
> > Beginners mailing list
> > Beginners@haskell.org
> > http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
> >  



------------------------------

Subject: Digest Footer

_______________________________________________
Beginners mailing list
Beginners@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners


------------------------------

End of Beginners Digest, Vol 110, Issue 1
*****************************************

Reply via email to